//
// Created by wze-zero on 2024/8/17 017.
//
#include <iostream>

using namespace std;

int main() {
    double num;
    cin >> num;
    cout << (int) num % 10 << endl;
    return 0;
}